import qs from "qs";
import request from "@/request/request";

// export const JingPinAPI = () => request.get("/products/recommend");

export const LoginAPI = (params) => request.post("/users/login", qs.stringify(params));

export const RegistAPI = (params) => request.post("/users/regist", qs.stringify(params));

export const AddCommentAPI = (params) => request.post("/strategies/addComment", qs.stringify(params));

// 请求轮播图数据
export const SwiperAPI = () => request.get("/index/banners/travel");

export const HotRegionAPI = () => request.get("/destinations/hotRegion");

export const TravelsAPI = (params) => request.get("/travels/query", { params });

export const SearchAPI = (params) => request.get("/destinations/search", { params });

export const QueryAPI = (params) => request.get("/strategies/query", { params });

export const DetailAPI = (params) => request.get("/strategies/detail", { params });

export const CommentsAPI = (params) => request.get("/strategies/comments", { params });